/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;

/**
 *
 * @author PhanHongMinh
 */
public class TCPEchoClient {

    public TCPEchoClient(){
        try {
            Socket s = new Socket("localhost", 2014);

            String str = "@$00|000|103|Client|Send|0|74$$update chi set thienchi=5000000 where chid='6'@$";
            PrintWriter out
                    = new PrintWriter(s.getOutputStream(), true);
            BufferedReader in
                    = new BufferedReader(
                            new InputStreamReader(s.getInputStream()));
            out.println(str);
            s.close();
        } catch (IOException e) {
            System.out.println("ERROR: " + e);
        }
    }
}
